package com.itcast.demoone.kotlin

fun main(){
    val p1 = Person()
    p1.name = "张三"
    p1.age = 18
    p1.intro()


    val p2 = Person()
    p2.name = "李四"
    p2.age = 28
    p2.intro()

    println(p1 == p2)

}



class Person {
    // 1. 属性
    var name: String = ""
    var age: Int = 0

    // 2. 方法
    fun intro() {
        println("我的名字叫 $name ,今年 $age 岁")
    }
}